<%@ page language="java" contentType="text/html; charset=UTF-8"
	import="it.polimi.swim.entity.HelpRequest, it.polimi.swim.entity.Skill,java.util.ArrayList,java.util.List"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="myStyle.css">
<title>My Help Request</title>
</head>
<body>
<div id='header' >
	<div style="float:left"><a href="homeUser.jsp">SWIMv2</a></div>
	<div style="float:right;"><a href="SignoutServlet">Sign out</a></div>
</div>
<div id="content"><br>
<%
List<HelpRequest> createdHelp = (List<HelpRequest>) request.getAttribute("createdHelps");
for(HelpRequest help:createdHelp){
	out.print("<form method='post' action='FeedbackServlet'>");
	out.print("Title: "+help.getTitle());
	out.print("<br>Description: "+help.getDescription());
	out.print("<br>Helper :"+help.getReceiver().getName());
	out.print("<input type='hidden' name = 'idHelp' value='"+help.getId()+"'>");
	if(help.getFeedback()==null){
	%>
	<br>Leave a feedback<br>
	<textarea rows="2" cols="50" name="feedMess"></textarea><br>
	<input type="radio" name="feed" value="OK" checked="checked"> <img width="20px" src="img/pollicesu.png"/><br>
	<input type="radio" name="feed" value="KO"> <img width="20px" src="img/polliceverso.png"/><br>
	<input type="submit" value="Send Feedback">
	</form>
	<%}
	out.print("<hr>");
}
%>
</div>
</body>
</html>